using System;
using System.Collections.Generic;
using ServerControls.ImageLink;

namespace UserInterface.Misc
{
    public class NavigationData
    {
        public class MapPathItem
        {
            private string name;
            private string navigationUrl;

            public MapPathItem(string name, string path)
            {
                this.name = name;
                this.navigationUrl = path;
            }

            public string Name
            {
                get { return name; }
            }

            public string NavigationUrl
            {
                get { return navigationUrl; }
            }
        }

        public class NavigationItem
        {
            private string imageUrl;
            private string navigationUrl;
            private string description;
            private string onClientClick;

            public NavigationItem(string imageUrl, string navigationUrl, string description)
            {
                this.imageUrl = imageUrl;
                this.navigationUrl = navigationUrl;
                this.description = description;
            }

            public NavigationItem(string imageUrl, string navigationUrl, string description, string onClientClick)
            {
                this.imageUrl = imageUrl;
                this.navigationUrl = navigationUrl;
                this.description = description;
                this.onClientClick = onClientClick;
            }

            public string ImageUrl
            {
                get { return imageUrl; }
            }

            public string NavigationUrl
            {
                get { return navigationUrl; }
            }

            public string Description
            {
                get { return description; }
            }

            public string OnClientClick
            {
                get { return onClientClick; }
            }
        }

        IList<MapPathItem> mapPathItems;
        IList<NavigationItem> navigationItems;

        public NavigationData()
        {
            mapPathItems = new List<MapPathItem>();
            navigationItems = new List<NavigationItem>();
        }

        public void AddPathItem(string name, string navigationUrl)
        {
            mapPathItems.Add(new MapPathItem(name, navigationUrl));
        }

        public void AddNavigationItem(string imageUrl, string navigationUrl, string description)
        {
            navigationItems.Add(new NavigationItem(imageUrl, navigationUrl, description));
        }

        public void AddNavigationItem(string imageUrl, string navigationUrl, string description, string onClientClick)
        {
            navigationItems.Add(new NavigationItem(imageUrl, navigationUrl, description, onClientClick));
        }

        public IList<MapPathItem> MapPathItems
        {
            get { return mapPathItems; }
        }

        public IList<NavigationItem> NavigationItems
        {
            get { return navigationItems; }
        }
    }
}
